﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;

using xfsale.lib;
using xfsale.ui;

namespace xfsale.ui.acct
{
    public partial class FrmTAAcctOpen : FrmBase2
    {
        public FrmTAAcctOpen()
        {
            InitializeComponent();
        }

        private void BtnOk_Click(object sender, EventArgs e)
        {
            SubmitForm();
        }

        private void BtnClose_Click(object sender, EventArgs e)
        {
            CloseFrame();
        }

        private void BtnClear_Click(object sender, EventArgs e)
        {
            ResetFrame();
        }

        private void FrmAcctTransOpen_Load(object sender, EventArgs e)
        {
            if (!this.DesignMode)
            {
                InitFrame();

                List<ValueTextPair> taCodes = Query.GetTACodes();
                CmbTACode.DisplayMember = "Text";
                CmbTACode.ValueMember = "Value";
                CmbTACode.Items.AddRange(taCodes.ToArray());
            }
        }

        private void TxtTransAccountID_Leave(object sender, EventArgs e)
        {
            ChangeTransAccountID(TxtTransAccountID);
        }
    }
}
